package com.oocl.euc.core.requestform.repository;

import com.oocl.euc.core.maintenance.model.SubCategory;
import com.oocl.euc.framework.base.persistence.IBaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SubCategoryRepository extends IBaseRepository<SubCategory,String> {

    //List<SubCategory> findByCategoryIdAndSubCategoryId(String categoryId, String subcategoryId);
    @Query(value="SELECT * FROM PCRS_SUBCATEGORY WHERE CATEGORY_ID = ?1 and SUBCATEGORY_ID = ?2"
            , nativeQuery = true)
    SubCategory findByCategoryIdAndSubCategoryId(String categoryId, String subcategoryId);

}
